package com.qf.mvc2203.controller;

import com.qf.mvc2203.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/user")
public class UserController {
    @RequestMapping("/insert")
    public String addUser(User user) {
        System.out.println(user);
        return "redirect:select";
    }

    @RequestMapping("/delete")
    public String delUser(Integer userID) {
        System.out.println(userID);
        return "redirect:select";
    }

    @RequestMapping("/select")
    public String listUser() {
        return "forward:/views/user.html";
    }
}
